import request from '@/utils/request'

// 获取key
export function getPublicKey() {
  return request({
    url: '/publicKey',
    method: 'get',
  })
}

// 获取用户手机号
export function getPhone() {
  return request({
    url: '/getPhone',
    method: 'get'
  })
}


// 发送验证码-未登录
export function sendSmsByPhone(phoneNumber) {
  return request({
    url: `/sendSmsByPhone/${phoneNumber}`,
    method: 'get'
  })
}

// 发送验证码
export function sendSms(phoneNumber) {
  return request({
    url: `/sendSms/${phoneNumber}`,
    method: 'get'
  })
}

export function checkSms(phoneNumber, code) {
  return request({
    url: `/checkSms/${phoneNumber}/${code}`,
    method: 'get'
  })
}
